import service from ".";

const ownerApi = {
    insert(owner) {
        return service.post('/admin/owner', owner);
    },
    delete(oid) {
        return service.delete(`/admin/owner/${oid}`);
    },
    update(owner) {
        return service.put('/admin/owner', owner);
    },
    selectAll() {
        return service.get('/admin/owner');
    },
    selectById(oid) {
        return service.get(`/admin/owner/${oid}`);
    },
    selectByPage(pageNum, searchCondition) {
        return service.get('/admin/owner', {
            params: {
                pageNum,
                oname: searchCondition.oname? searchCondition.oname : '',
                ophone: searchCondition.ophone? searchCondition.ophone : ''
            }
        });
    },
    //导出数据
    exportExcel() {
        return service.get("/admin/owner/export", {
            responseType: 'blob'
        });
    },


};

export default ownerApi;